<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
    <style>
        img{
            width: 100px;
            position: relative;
        }

    </style>
    <script src="../js/jquery-1.4.2.js"></script>
    <script>
        $(function(){
            $("input").click(function(){
                if (this.value=="隐藏"){
                    $("img").hide(3000,function() {
                        alert("xxx");
                    });
                }else if(this.value=="显示"){
                    $("img").show(2000);
                }else if(this.value=="淡出"){
                    $("img").fadeOut(2000);
                }else if(this.value=="淡入"){
                    $("img").fadeIn(2000);
                }else if(this.value=="上滑"){
                    $("img").slideUp(2000);
                }else if(this.value=="下滑"){
                    $("img").slideDown(2000);
                }else{//自定义
                    $("img").animate({"left":"200px"},500).animate({"top":"200px"},500)
                        .animate({"left":"0px"},500).animate({"top":"0px"},500)
                        .animate({"width":"500px"},500).animate({"width":"100px"},500)
                        .fadeOut(300,function(){
                            $("img").remove();
                        });

                }
            });
        });
    </script>
</head>
<body>
    <input type="button" value="隐藏">
    <input type="button" value="显示">
    <input type="button" value="淡出">
    <input type="button" value="淡入">
    <input type="button" value="上滑">
    <input type="button" value="下滑">
    <input type="button" value="自定义">
<hr>
<img src="../../1903Web/imgs/5.jpg">
</body>
</html>